package com.sample.thread.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.sample.thread.util.AsyncTask;

/**
* @comments
* @author  zg
* @date 2021年3月13日
*/
@RestController
@RequestMapping("test")
public class TestController {
    
    @Autowired
    private AsyncTask asyncTask;

    @RequestMapping("/thread-pool")
    public String threadPool() {
        asyncTask.doJob();
        System.out.println("OK");
        return "OK";
    }
    
}
